<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="../node_modules/socket.io-client/dist/socket.io.js"></script>
</head>
<body>
<script>
const socket = io('wss://localhost:8443/intercom', {
  transports: ['websocket'],
  allowUpgrades: true,
  query: {
    userId: 'xxx-xxx-xxx',
    username: 'zhangsan',
  }
})


socket.on('connect', () => {
  console.log('connect')

  setTimeout(connection, 200)
})

  function connection() {
    socket.emit('join', {room: { classId: 'room007'}}, () => {})
  }

</script>
</body>
</html>
